package javasea.orm.mybatisplus.dynamicDS.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import javasea.orm.mybatisplus.dynamicDS.entity.PageInfo;
import javasea.orm.mybatisplus.dynamicDS.entity.User;
import javasea.orm.mybatisplus.dynamicDS.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserContorller {

    @Autowired
    private UserService userService;

    // 查
    @GetMapping( value = "/selectAll")
    public List<User> selectAll() {
//        List<User> list = userService.lambdaQuery().list();
        List<User> list2 = userService.listAll();
//        return userService.selectAll();
        return list2;
    }

}
